<script setup>
import Logo from "@/components/Logo.vue";
import {useRouter} from "vue-router";
import {HOME_ROUTE} from "@/router/routes/home/home.js";
import {SEARCH_ROUTE} from "@/router/routes/search/search.js";

const router = useRouter()

const clickLeftHandler = () => {
  router.push({name: HOME_ROUTE})
}

const goSearch = () => {
  router.push({name: SEARCH_ROUTE})
}
</script>

<template>
  <van-nav-bar fixed placeholder @click-left="clickLeftHandler">
    <template #left>
      <Logo :text-size="'text-3xl'"></Logo>
    </template>
    <template #right>
      <van-icon @click="goSearch" name="search" size="20"/>
    </template>
  </van-nav-bar>
</template>

<style scoped lang="scss">

</style>